package com.ag.zrt.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.ag.zhh.dao.ZHHEventPlanDAO;
import com.ag.zrt.service.ZRTIEventPlanService;
@Service("ZRTEventPlanService")
public class ZRTEventPlanService implements ZRTIEventPlanService {
	@Resource(name = "ZHHEventPlanDAO")
	private ZHHEventPlanDAO eventPlanDAO;

	public void setEventPlanDAO(ZHHEventPlanDAO eventPlanDAO) {
		this.eventPlanDAO = eventPlanDAO;
	}

	@Override
	public String checkPlan(String eventId) throws Exception {

		if (eventPlanDAO.findPlanByEId(eventId) != null) {
			return "started";
		} else {
			return "empty";
		}

	}

}
